import request from '@/util/request'

// 获取消息未读数
export function getCount() {
  return request({
    url: '/aqs/message/getCount',
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}
// 获取个人消息列表
export function listPersonalMsg(index, size) {
  return request({
    url: `/aqs/message/listPersonalMsg/${index}/${size}`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

// 获取系统消息列表
export function listSystemMsg(index, size) {
  return request({
    url: `/aqs/message/listSystemMsg/${index}/${size}`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

// 获取系统消息详情
export function getSysMsgDetail(msgGroupId) {
  return request({
    url: `/aqs/message/selectUserSysMsgDetail/${msgGroupId}`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

// 获取个人消息详情
export function getPersonalMsgDetail(id) {
  return request({
    url: `/aqs/message/getPersonalMsgDetail/${id}`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

// 用户删除个人消息
export function deletePersonalMsg (ids) {
  return request({
    url: `/aqs/message/deletePersonalMsg/${ids}`,
    method: 'delete',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

// 用户删除系统消息
export function deleteUserSysMsgByGroupIds (msgGroupIds) {
  return request({
    url: `/aqs/message/deleteUserSysMsgByGroupIds/${msgGroupIds}`,
    method: 'delete',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}